package cn.valorin.gui.custom;

import static cn.valorin.configuration.languagefile.MessageSender.gm;

import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;

import cn.valorin.gui.MyInventoryHolder;
import cn.valorin.item.Gui0;
import cn.valorin.via.Via;

public class Water {
    public static Inventory get(Player opener) {
    	MyInventoryHolder holder = new MyInventoryHolder(opener, 0);
    	Inventory inventory = Bukkit.createInventory(holder, 54,
    			gm("&9浸泡",opener));
    	ItemStack black = Via.black_stained_glass_pane;
    	ItemMeta blackM = black.getItemMeta();
    	blackM.setDisplayName("      ");
    	black.setItemMeta(blackM);
    	int[] blackSlots = {1,7,9,10,16,17,18,26,27,35,36,37,40,44,46,47,48,50,51,52};
    	ItemStack gray = Via.gray_stained_glass_pane;
    	ItemMeta grayM = black.getItemMeta();
    	grayM.setDisplayName("      ");
    	gray.setItemMeta(grayM);
    	int[] graySlots = {2,3,4,5,6};
    	ItemStack white = Via.white_stained_glass_pane;
    	ItemMeta whiteM = black.getItemMeta();
    	whiteM.setDisplayName("      ");
    	white.setItemMeta(whiteM);
    	int[] whiteSlots = {0,8,11,12,13,14,15,19,25,28,34,38,39,41,42,45,53};
    	for (int blackSlot : blackSlots) {
    		inventory.setItem(blackSlot, black);
    	}
    	for (int graySlot : graySlots) {
    		inventory.setItem(graySlot, gray);
    	}
    	for (int whiteSlot : whiteSlots) {
    		inventory.setItem(whiteSlot, white);
    	}
    	inventory.setItem(43, Gui0.get2(opener));
    	inventory.setItem(49, Gui0.get0(opener));
    	return inventory;
    }
}
